package com.example.figurehecheng.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 图片关联表
 * </p>
 *
 * @author author
 * @since 2025-03-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("image")
@ApiModel(value="Image对象", description="图片关联表")
public class Image implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "图片ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "关联ID")
    @TableField("relation_id")
    private Long relationId;

    @ApiModelProperty(value = "关联类型(scenery/restaurant/dish/venues/hotel/news/culture)")
    @TableField("type")
    private String type;

    @ApiModelProperty(value = "图片URL")
    @TableField("url")
    private String url;

    @ApiModelProperty(value = "排序")
    @TableField("sort_order")
    private Integer sortOrder;

    @ApiModelProperty(value = "是否为封面(0:否 1:是)")
    @TableField("is_cover")
    private Boolean isCover;

    @ApiModelProperty(value = "创建时间")
    @TableField("created_at")
    private LocalDateTime createdAt;


}
